<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@include file="/view/common.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<base href="<%=basePath%>">
<title>系统首页</title>
<script src="/chusumanage/resource/echarts/js/echarts.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		console.log("进入加载");
		$.ajax({
			url:"menulist2.do",
			dataType:"json",
			type:"POST",
			success:function(result){
				console.info("进入结果集");
				menulist=result.menuList;
				menu_list(menulist);
			}
		}); 
	});
	
	function menu_list(menulist){
		var menu_list="";
		for(var i=0;i<menulist.length>0;i++){
		menu_list=	"<li>"+
						"<a href='"+menulist[i].url+"'>"+
						"<i class='"+menulist[i].icon+"'>"+
						"<span class='menu-text'>"+menulist[i].menuname+"</span>"+
						"</a>"+
					"</li>";
		$(".nav-list").html(menu_list);
		}
	}
	function link(url) {
		console.info(url);
		$.ajax({
			url : url,
			type : "POST",
			contentType : "application/x-www-formurlencoded;charset=UTF-8",
			cache : false,
			success : function(data) {
				setRightData(data);
			}
		});
	}

	function setRightData(data) {
		$("#content").html(data);
	}
	
</script>

<style type="text/css">
.content {
	width: 70%;
	height: 70%;
	z-index: -10;
	float: right;
}

.main-container {
	z-index: 999;
}
</style>
</head>
<body>
	<div class="navbar navbar-default" id="navbar">
		<div class="navbar-container" id="navbar-container">
			<div class="navbar-header pull-right" role="navigation">
				<ul class="nav ace-nav" style="height: inherit;">
					<li class="light-blue"><a data-toggle="dropdown" href="#"
						class="dropdown-toggle"> <i class="icon-bell-alt"></i> <span
							class="user-info"> <small>欢迎光临</small> ${user.username} </span> </a>
					</li>
				</ul>
			</div>
		</div>
	</div>
	<div class="main-container" id="main-container">
		<div class="main-container-inner">
			<a class="menu-toggler" id="menu-toggler" href="#"> <span
				class="menu-text"></span> </a>
			<div class="sidebar leftMenu" id="sidebar">
				<div class="sidebar-shortcuts" id="sidebar-shortcuts"></div>
				<ul class="nav nav-list">
					<%-- c:choose>
						<c:when test="${not empty menuList}">
							<c:forEach items="${menuList}" var="menu" varStatus="vs">
								<li><a href="#"> 
								<i class="${menuList.icon}"></i> <span class="menu-text">${menuList.menuname}</span>
								</a>
								</li>
							</c:forEach>
						</c:when>
					</c:choose> --%>
					<li menuId="1"><a href="/chusumanage/view/pie.jsp" /> <i
						class="icon-home"></i> <span class="menu-text">首页</span>
						</a>
					</li>
					<li menuId="3"><a href="/chusumanage/view/zhuzhuang.jsp" /> <i
						class="icon-home"></i> <span class="menu-text">应用列表</span>
						</a>
					</li>
					<li menuId="4"><a href="" /> <i class="icon-camera"></i> <span
						class="menu-text">应用分类统计</span> </a>
					</li>
					<li menuId="19"><a href="" /> <i class="icon-tag"></i> <span
						class="menu-text">应用年月统计</span> </a>
					</li>
					<li menuId="20"><a href="" /> <i class="icon-list"></i> <span
						class="menu-text">应用分类月统计</span> </a>
					</li>
				</ul>
				<!-- /.nav-list -->
				<div class="sidebar-collapse" id="sidebar-collapse">
					<i class="icon-double-angle-left"
						data-icon1="icon-double-angle-left"
						data-icon2="icon-double-angle-right"></i>
				</div>
			</div>
			<div class="main-content">
				<!-- 导航栏 start-->
				<div class="breadcrumbs" id="breadcrumbs">
					<ul class="breadcrumb" style="line-height: inherit;">
						<li><i class="icon-home home-icon"></i> <a>首页</a>
						</li>
					</ul>
				</div>
				<!-- 导航栏 end -->
				<div class="page-content" id="myContent">
					<div id="app_list"
						style="width:30%;height: 50%;float:left;margin-left: 10%;margin-top:5%;"></div>
					<div id="app_year"
						style="width:30%;height: 50%;float:left;margin-left: 10%;margin-top:5%;"></div>
				</div>
			</div>
		</div>
	</div>
	<%-- <div id="content" class="content">
		<jsp:include page="/view/pie.jsp">
		</jsp:include>
	</div> --%>
</body>
</html>